package com.bjdd.jdy.ui.resetPwd;

import com.bjdd.jdy.base.BaseResult;
import com.bjdd.jdy.util.Api;
import com.bjdd.jdy.util.RxSchedulers;

import rx.Observable;

/**
 * Created by Administrator on 2017/4/12.
 */

public class ResetPwdModel implements ResetPwdContract.Model {
    @Override
    public Observable<BaseResult<String>> getCodeModel(String mobile, String timestamp, String sign) {
        return Api.getInstance().service
                .getForgetCode(mobile,timestamp,sign)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<BaseResult<String>> getResultModel(String mobile, String pwd, String code, String timestamp, String sign) {
        return Api.getInstance().service
                .resetPwd(mobile,pwd,code,timestamp,sign)
                .compose(RxSchedulers.io_main());
    }
}
